{
  LW LCore -- LightWave LCore Exports

  This header contains declarations for the public services
  provided by the LightWave LCore subsystem.

  Based on lwlcore.h which is:
  Copyright 2002, NewTek, Inc.
}

{
  Copyright 2012, Jameel Halabi

  This unit is part of the BlaiseWave wrapper,
  which is licensed under the BSD 2-Clause license (see licenses/license.txt).
}

unit LW_LCore;

{$mode objfpc}{$H+}

interface

uses
  LW_Render  ,
  LW_Globsrv ;

const
  { The LScript Universal Requester

    This mechanism makes it possible for a C plug-in to employ LScript
    as its requester interface.  This makes it possible to use the
    LSIDE Interface Designer to design the requester, and LScript
    itself to test it before planting it into the C plug-in.           }
    LWLSUR_GLOBAL = 'LSUniversalRequester' ;

type
  PLWLSUR = Pointer;

  PLSURFuncs = ^TLSURFuncs;
  TLSURFuncs = record
    { The compile() function takes a character string holding
      the interface script to be compiled, and a pointer to a
      pointer of character pointers to hold the identified
      user-defined variables (if any) in the expression.  It
      returns an opaque pointer that represents the compiled
      script, or NULL of something goes horribly wrong.       }
    Compile : function
              ( const Script         : PPChar   ;
                      Messages       : PPChar   ;
                      MessagesLength : Integer  ) : PLWLSUR ;

    { The post() function takes a compiled interface script, returned
      by compile(), and runs it.  Variable data referenced by the
      script should sequentially match the data provided in the second
      argument.  Each element will be cast to the appropriate data type
      based upon the type of control created for data exchange.         }
    Post    : function
              (       CompiledScript : PLWLSUR  ;
                      VariablesData  : PPointer ) : Integer ;

    { When a host is finished with an interface script, it should
      call the release() function with the scrpit pointer.
      This frees memory used by the script.                       }
    Release : procedure
              (       Script         : PLWLSUR ) ;
  end;

implementation

end.

